home *** CD-ROM | disk | FTP | other *** search
Wrap
RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhDDDDiiiiccccttttiiiioooonnnnaaaarrrryyyyIIIItttteeeerrrraaaattttoooorrrr((((3333CCCC++++++++)))) RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhDDDDiiiiccccttttiiiioooonnnnaaaarrrryyyyIIIItttteeeerrrraaaattttoooorrrr((((3333CCCC++++++++)))) NNNNaaaammmmeeee RWTPtrHashDictionaryIterator<K,V> - Rogue Wave library class SSSSyyyynnnnooooppppssssiiiissss #include <rw/tphdict.h> unsigned hashFun(const K&); RWTPtrHashDictionary<K,V> dictionary(hashFun); RWTPtrHashDictionaryIterator<K,V> iterator(dictionary); PPPPlllleeeeaaaasssseeee NNNNooootttteeee!!!! IIIIffff yyyyoooouuuu ddddoooo nnnnooootttt hhhhaaaavvvveeee tttthhhheeee SSSSttttaaaannnnddddaaaarrrrdddd CCCC++++++++ LLLLiiiibbbbrrrraaaarrrryyyy,,,, uuuusssseeee tttthhhheeee iiiinnnntttteeeerrrrffffaaaacccceeee ddddeeeessssccccrrrriiiibbbbeeeedddd hhhheeeerrrreeee.... OOOOtttthhhheeeerrrrwwwwiiiisssseeee,,,, uuuusssseeee tttthhhheeee iiiinnnntttteeeerrrrffffaaaacccceeee ttttoooo RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaappppIIIItttteeeerrrraaaattttoooorrrr described in the Class Reference. DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn Iterator for class RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhDDDDiiiiccccttttiiiioooonnnnaaaarrrryyyy<<<<KKKK,,,,VVVV>>>> allowing sequential access to all keys and values of a parameterized hash dictionary. Elements are not accessed in any particular order. Like all Rogue Wave iterators, the "current item" is undefined immediately after construction -- you must define it by using ooooppppeeeerrrraaaattttoooorrrr(((()))) or some other (valid) operation. Once the iterator has advanced beyond the end of the collection it is no longer valid -- continuing to use it will bring undefined results. PPPPeeeerrrrssssiiiisssstttteeeennnncccceeee None PPPPuuuubbbblllliiiicccc CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhDDDDiiiiccccttttiiiioooonnnnaaaarrrryyyyIIIItttteeeerrrraaaattttoooorrrr(RWTPtrHashDictionary& c); Constructs an iterator to be used with the dictionary cccc. PPPPuuuubbbblllliiiicccc OOOOppppeeeerrrraaaattttoooorrrrssss RWBoolean ooooppppeeeerrrraaaattttoooorrrr++++++++(); Advances the iterator to the next key-value pair and returns TTTTRRRRUUUUEEEE. When the end of the collection is reached, returns FFFFAAAALLLLSSSSEEEE and the position of the iterator will be undefined. PPPPaaaaggggeeee 1111 RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhDDDDiiiiccccttttiiiioooonnnnaaaarrrryyyyIIIItttteeeerrrraaaattttoooorrrr((((3333CCCC++++++++)))) RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhDDDDiiiiccccttttiiiioooonnnnaaaarrrryyyyIIIItttteeeerrrraaaattttoooorrrr((((3333CCCC++++++++)))) K* ooooppppeeeerrrraaaattttoooorrrr(((())))(); Advances the iterator to the next key-value pair and returns a pointer to the key. When the end of the collection is reached, returns nnnniiiillll and the position of the iterator will be undefined. Use member function vvvvaaaalllluuuueeee(((()))) to recover the dictionary value. PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrr FFFFuuuunnnnccccttttiiiioooonnnnssss RWTPtrHashDictionary* ccccoooonnnnttttaaaaiiiinnnneeeerrrr() const; Returns a pointer to the collection over which this iterator is iterating. K* kkkkeeeeyyyy() const; Returns a pointer to the key at the iterator's current position. The results are undefined if the iterator is no longer valid. void rrrreeeesssseeeetttt(); Resets the iterator to the state it had immediately after construction. void rrrreeeesssseeeetttt(RWTPtrHashDictionary& c); Resets the iterator to iterate over the collection cccc. V* vvvvaaaalllluuuueeee() const; Returns a pointer to the value at the iterator's current position. The results are undefined if the iterator is no longer valid. PPPPaaaaggggeeee 2222